package com.love.marriage.regionInfo.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.love.marriage.common.vo.BaseVo;
import com.love.marriage.config.Long2StringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * description:  省市区信息表Vo
 * author:       alex
 * createDate:   2024-10-13 21:41:13
 * version:      1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(name = "RegionInfoVo", description = "省市区信息表Vo")
public class RegionInfoVo extends BaseVo<RegionInfoVo>{

    @Schema(description = "区域名称", type = "String", implementation = String.class)
    private String name;

    @Schema(description = "区域编码", type = "String", implementation = String.class)
    private String code;

    @Schema(description = "区域级别: 1=省, 2=市, 3=区", type = "Integer", implementation = Integer.class)
    private Integer level;

    @JsonSerialize(using = Long2StringSerializer.class)
    @Schema(description = "父级区域ID，省为NULL，市为省ID，区为市ID", type = "Long", implementation = Long.class)
    private Long parentId;
}
